import type { PageParams, PageResult } from '@/types/global'
import type {
  startChargingResult,
  getChargingOrder,
  chargeOrderParams,
  postSendProblem,
} from '@/types/charge'
import { http } from '@/utils/http'
export const getchargingResultAPI = (gunId: string) => {
  return http<startChargingResult>({
    method: 'POST',
    url: '/app/charge/start',
    data: { gunId },
  })
}

export const getClosechargingResultAPI = (data: any) => {
  return http<startChargingResult>({
    method: 'POST',
    url: '/app/charge/stop',
    data: data,
  })
}
export const getChargingOrderinfo = (data: chargeOrderParams) => {
  return http<getChargingOrder>({
    method: 'POST',
    url: '/app/charge/record',
    data: data,
  })
}

export const getSendProblemResultAPI = (data: any) => {
  return http<postSendProblem>({
    method: 'POST',
    url: '/app/home/news/',
    data: data,
  })
}
